Visual Studio projects: Speed up build
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 May 2022 05:55:13 +0000 (13:55 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 May 2022 06:56:31 +0000 (14:56 +0800)
...for the sources and header generating phase, so that we can reduce
the number of times that we generate the source file lists that we need.

win32/generate-msvc.mak

index e32c1571a9ca6780a892b0bb66d58bd210ed0825..b4f5a69f933b824ca4987386e12a1a4e73b82b64 100644 (file)
@@ -3,8 +3,8 @@
 # Items in here should not need to be edited unless
 # one is maintaining the NMake build files.
 
-!include ../demos/gtk-demo/demos-sources.mak
 !include config-msvc.mak
+!include ../demos/gtk-demo/demos-sources.mak
 !include create-lists-msvc.mak
 
 # Copy the pre-defined gdkconfig.h.[win32|win32_broadway]
@@ -189,15 +189,16 @@ generate-base-sources:    \
 
 .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtkdbusgenerated.c: .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtkdbusgenerated.h
 
-.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypefuncs.inc: ..\gtk\gentypefuncs.py
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypefuncs.inc:    \
+..\gtk\gentypefuncs.py \
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtkversion.h \
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypebuiltins.h
        @echo Generating $@...
        @if not exist $(@D)\ md $(@D)
-       @if not exist $(@D)\gtktypebuiltins.h $(MAKE) /f generate-msvc.mak CFG=$(CFG) $(@D)\gtktypebuiltins.h
-       @if not exist $(@D)\gtkversion.h $(MAKE) /f generate-msvc.mak CFG=$(CFG) $(@D)\gtkversion.h
        @echo #undef GTK_COMPILATION > $(@R).preproc.c
        @echo #include "gtkx.h" >> $(@R).preproc.c
        @cl /EP $(GTK_PREPROCESSOR_FLAGS) $(@R).preproc.c > $(@R).combined.c
-       @$(PYTHON) $** $@ $(@R).combined.c
+       @$(PYTHON) ..\gtk\gentypefuncs.py $@ $(@R).combined.c
        @del $(@R).preproc.c $(@R).combined.c
 
 .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtk.gresource.xml: $(GTK_RESOURCES)